{% extends "core/base_core.html" %}
{% block title %} - "{{event.name}}"现场活动签到{% endblock %}
{% block extra_head %}
<style type="text/css" media="screen">
  #toolbar,
  .navigator-wrap {
    display: none;
  }
  .messages {
    font-size: 35px;
    text-align: center;
  }
</style>
{% endblock %}

{% block content %}
<div id="content" class="content">
  <div class="container_16">
    {% if event %}
    <div class="grid_6">
      <h2>{{event.name}}</h2>
      <dl class="pair">
        <dt>时间：</dt><dd>{{event.begin_time|date:'Y年m月d日'}}</dd>
        <div class="clear"></div>
      </dl>
      <img src="{{event.poster}}" alt="下次活动海报" width="300" height="236.7" class="shadow"/>
    </div>
    <div id="event-checkin" class="grid_10">
      <form action="/event/checkin" method="post" class="wide">
        {% csrf_token %}
        <h2>“{{event.name}}”活动现场签到</h2>
        {{ form.as_p }}
        <input id="checkin_submit" type="submit" value="签到" tabindex="2"/>
      </form>
    </div>
    {% endif %}
  </div>
</div>
<script type="text/javascript">  
  $(function(){
    $('#id_email').focus().val('');
    $('#id_email').click(function(){
      email = $(this);
      email.select();
    });
    $('#checkin_submit').click(function(){
    $("#header").prepend('<ul class="messages"><li class="error">签到中...</li></ul>');
    });
    function fadeOutMessages(){
        $('.messages').fadeOut('slow')
        }
    setTimeout(fadeOutMessages,1984)
  });
</script>
{% endblock %}
